﻿Ext.Ajax.on("requestcomplete", checkUserSessionStatus, this);
function checkUserSessionStatus(conn, response, options) {
    //Ext重新封装了response对象
    var headers = response.getAllResponseHeaders();
    if (response.getAllResponseHeaders().indexOf("Sessionstatus") > 0) {
            var parent = window.parent;
            parent.location = "/Account/Logon";
        }
}

ShowSessionTimeOutBox = function () {
    var config = {
        title: "会话超时",
        msg: "由于您太久没有操作，请重新登录以保证用户安全",
        width: 500,
        height:300,
        multiline: false,
        closable: false,
        buttons: Ext.MessageBox.OK,
        icon: Ext.MessageBox.WARNING,
        fn: function (btn, txt) {
            window.parent.location = "/Account/Logon";
        }
    };
    Ext.MessageBox.show(config);
}
